package com.ebookstore.service;

import com.ebookstore.service.impl.EBookStoreImpl;

/** 通过单例模式来创建管理整个系统的对象 */
public class EBookStoreFactory {
	/** 设置为私有类型,不允许外部类实例化 */
	private EBookStoreFactory() {
	}

	/** 定义为静态类型 */
	private static EBookStoreFacade eBookStoreFacade;

	/** 获得该实例 */
	public static EBookStoreFacade getInstance() {
		if (eBookStoreFacade == null)
			eBookStoreFacade = new EBookStoreImpl();
		return eBookStoreFacade;
	}
}
